<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix='c' uri='http://java.sun.com/jstl/core_rt'%>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@ page
	import="org.springframework.security.core.AuthenticationException"%>
	<%@ page import="java.net.URL" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Home</title>

<link rel="stylesheet" type="text/css"
	href=${pageContext.servletContext.contextPath}/static/css/start-style.css />
	
<link rel="stylesheet" type="text/css"
	href=${pageContext.servletContext.contextPath}/static/css/jquery-ui-1.8.14.custom.css />
<script type="text/javascript"
	src=${pageContext.servletContext.contextPath}/static/javascript/jquery-1.6.2.min.js></script>
<script type="text/javascript"
	src=${pageContext.servletContext.contextPath}/static/javascript/jquery-1.6.2.min.js></script>
<script type="text/javascript"
	src=${pageContext.servletContext.contextPath}/static/javascript/jquery-ui-1.8.16.custom.min.js></script>
<script type="text/javascript"
	src=${pageContext.servletContext.contextPath}/static/javascript/jquery.validate-1.5.5.min.js></script>
	
<script type="text/javascript">
	$(document).ready(function() {
		
			
			var configSearch = $('#lcsearch');
	
			var callback = function(event, ui) {
				if (ui.item) {
					window.location.href = '../rent/confirm.do?id='+ui.item.id;
						}
			};
			
			var acdata = $("#lcsearch").autocomplete({
				source: "query.do",
				minLength: 1,
				select: callback
			}).data("autocomplete");
			
			acdata._renderItem = function(ul, item) {
				item.label = item.label.replace(
					new RegExp(
						"(?![^&;]+;)(?!<[^<>]*)(" +
						$.ui.autocomplete.escapeRegex($("#lcsearch").val()) +
						")(?![^<>]*>)(?![^&;]+;)", "gi"
					), "<strong style='color: red'>$1</strong>" );
				item.label = item.label.replace(
					new RegExp(
						"(?![^&;]+;)(?!<[^<>]*)(" +
						", [^,]+$" +
						")(?![^<>]*>)(?![^&;]+;)", "gi"
					), "<i>$1</i>" );
					
				return $("<li></li>").data("item.autocomplete", item).append($("<a></a>").html(item.label)).appendTo(ul);
			}
			
			$("#lcsearch").focus(function(){
				$(this).val('');
			});
	
	});
</script>
<title>WypoÅ¼yczalnia samochodÃ³w</title>
</head>
  <body> 
    <div id="wrapper">
      <div id="bg"> 
        <div id="header"></div>  
        <div id="page">
        	<jsp:include page="header.jsp"/>
            
            <!--  content -->  
            <div id="content"> 
            
              <div id="center">
                <div id="lista">
                
                <p><h2>Szybkie wyszukiwanie dostpępnych samochodów</h2></p>
                	<div class="search ui-widget">
											<input type="text" name="search" id="lcsearch" value="Wprowadz nazwe..."
												title="Wprowadz nazwe..." class="search-field" />
					</div>

                </div> 
                <div id="main_content">
				</div>
              </div>  
              
              <div id="right"> 
		        	<jsp:include page="sidebar.jsp"/>
              </div>  
              <div class="clear" style="height:40px"></div> 
            </div>  
            <!-- end content --> 
          </div>  
          <!-- end container --> 
        </div>  
        <div id="footerWrapper"> 
          <div id="footer"> 
            <p style="padding-top:10px;"> 
              <a href="#" shape="rect">Home</a> | 
              <a href="#" shape="rect">Products</a> | 
              <a href="#" shape="rect">Services</a> | 
              <a href="#" shape="rect">News</a> | 
              <a href="#" shape="rect">About</a> 
            </p>  
            <p> 
              <!-- 
DO NOT REMOVE OR MODIFY THE FOOTER LINK BELOW.
If you want to remove this link please make a 10 dollars donation at www.dotemplate.com
-->  
              <a href="http://www.dotemplate.com" shape="rect">Templates</a> maker
            </p> 
          </div> 
        </div> 
      </div> 
  </body>
</html>
